package Model;


import java.util.ArrayList;
import java.util.List;

public class Roller2 {
    public boolean ifNeedRestart=false;
    public String get6DData(String rawData){
        rawData = rawData.replaceAll(" +"," ");
        String arrayData[] = rawData.split(" ");
        //洗衣命令
        String washOrderCommand;
        String result = "";
        Integer countNum = 1;
        //洗衣程序
        String washProg = arrayData[12];
        switch (washProg){
            case "00":
                washOrderCommand="空流程";
                break;
            case "01":
                washOrderCommand="棉麻";
                break;
            case "02":
                washOrderCommand="化纤";
                break;
            case "03":
                washOrderCommand="羽绒";
                break;
            case "04":
                washOrderCommand="窗帘";
                break;
            case "05":
                washOrderCommand="混合";
                break;
            case "06":
                washOrderCommand="衬衣";
                break;
            case "07":
                washOrderCommand="童装";
                break;
            case "08":
                washOrderCommand="轻柔/丝绸";
                break;
            case "09":
                washOrderCommand="烫烫净/煮洗";
                break;
            case "0A":
                washOrderCommand="羊毛";
                break;
            case "0B":
                washOrderCommand="牛仔";
                break;
            case "0C":
                washOrderCommand="空气洗";
                break;
            case "0D":
                washOrderCommand="筒自洁";
                break;
            case "0E":
                washOrderCommand="内衣";
                break;
            case "0F":
                washOrderCommand="快速洗/速洗";
                break;
            case "10":
                washOrderCommand="快洗29";
                break;
            case "11":
                washOrderCommand="大物/大件洗";
                break;
            case "12":
                washOrderCommand="运动服";
                break;
            case "13":
                washOrderCommand="摇篮柔洗";
                break;
            case "14":
                washOrderCommand="爱婴洗/婴儿服";
                break;
            case "15":
                washOrderCommand="及时洗/日常洗";
                break;
            case "16":
                washOrderCommand="真丝";
                break;
            case "17":
                washOrderCommand="记忆洗";
                break;
            case "18":
                washOrderCommand="护色洗";
                break;
            case "19":
                washOrderCommand="手洗";
                break;
            case "1A":
                washOrderCommand="毛巾洗/小件洗";
                break;
            case "1B":
                washOrderCommand="单漂洗";
                break;
            case "1C":
                washOrderCommand="单脱水";
                break;
            case "1D":
                washOrderCommand="单烘干";
                break;
            case "1E":
                washOrderCommand="单排水";
                break;
            case "1F":
                washOrderCommand="床单/被罩";
                break;
            case "20":
                washOrderCommand="户外服/休闲服";
                break;
            case "21":
                washOrderCommand="夜洗";
                break;
            case "22":
                washOrderCommand="架干燥";
                break;
            case "23":
                washOrderCommand="抖散";
                break;
            case "24":
                washOrderCommand="护肤洗";
                break;
            case "25":
                washOrderCommand="消毒洗";
                break;
            case "26":
                washOrderCommand="高端专属洗";
                break;
            case "27":
                washOrderCommand="快洗58";
                break;
            case "28":
                washOrderCommand="加强洗";
                break;
            case "29":
                washOrderCommand="熨烫";
                break;
            case "2A":
                washOrderCommand="小太阳";
                break;
            case "2B":
                washOrderCommand="定时烘干";
                break;
            case "2C":
                washOrderCommand="衣架烘干";
                break;
            case "2D":
                washOrderCommand="卡片洗";
                break;
            case "2E":
                washOrderCommand="巨浪洗";
                break;
            case "2F":
                washOrderCommand="欧标棉麻";
                break;
            case "30":
                washOrderCommand="欧标化纤";
                break;
            case "31":
                washOrderCommand="防过敏";
                break;
            case "32":
                washOrderCommand="除异味";
                break;
            case "33":
                washOrderCommand="时间洗";
                break;
            case "34":
                washOrderCommand="冲锋衣";
                break;
            case "35":
                washOrderCommand="APP自诊断";
                break;
            case "36":
                washOrderCommand="毛毯洗";
                break;
            case "37":
                washOrderCommand="Standard";
                break;
            case "38":
                washOrderCommand="本机智慧洗";
                break;
            case "39":
                washOrderCommand="智慧云洗";
                break;
            case "3A":
                washOrderCommand="浴巾";
                break;
            case "3B":
                washOrderCommand="紫外除菌";
                break;
           default:
               washOrderCommand="N";
               break;

        }
        result += countNum+":"+washOrderCommand+"@";
        countNum++;
        //设定烘干程序
        String dryPro = arrayData[13];
        switch (dryPro){
            case "00":
                washOrderCommand = "无烘干过程";
                break;
            case "01":
                washOrderCommand = "强烘";
                break;
            case "02":
                washOrderCommand = "弱烘";
                break;
            case "03":
                washOrderCommand = "熨烫";
                break;
            case "04":
                washOrderCommand = "120分钟烘干";
                break;
            case "05":
                washOrderCommand = "90分钟烘干";
                break;
            case "06":
                washOrderCommand = "60分钟烘干";
                break;
            case "07":
                washOrderCommand = "30分钟烘干";
                break;
            case "08":
                washOrderCommand = "150分钟烘干";
                break;
            case "09":
                washOrderCommand = "180分钟烘干";
                break;
            case "0A":
                washOrderCommand = "智能烘干";
                break;
            default:
                washOrderCommand="N";
                break;
        }
        result += countNum + ":" +washOrderCommand+"@";
        countNum++;
        //设定附加控制功能A
        String additionA = arrayData[14];
        int additionAInteger = Integer.parseInt(additionA,16);
        String additionABinary = Integer.toBinaryString(additionAInteger);
        while (additionABinary.length()<8){
            additionABinary = "0"+additionABinary;
        }
        //String additionAValue="";
        char Zero=additionABinary.charAt(7);
        char First=additionABinary.charAt(6);
        char Second=additionABinary.charAt(5);//未使用
        char Third=additionABinary.charAt(4);
        char Fourth=additionABinary.charAt(3);
        char Fifth=additionABinary.charAt(2);
        char Sixth=additionABinary.charAt(1);//未使用
        char Seventh=additionABinary.charAt(0);
        switch (Zero){
            case '0':
                washOrderCommand = "蜂鸣音静音(不蜂鸣)";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "蜂鸣音不静音(蜂鸣)";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (First){
            case '0':
                washOrderCommand = "非智慧洗衣程序";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "智慧洗衣程序";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (Third){
            case '0':
                washOrderCommand = "关闭语音功能";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "开启语音功能";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (Fourth){
            case '0':
                washOrderCommand = "关闭强力去污/超净洗功能";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "开启强力去污/超净洗功能";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (Fifth){
            case '0':
                washOrderCommand = "关闭消毒剂自动投放";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "开启消毒剂自动投放";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (Seventh){
            case '0':
                washOrderCommand = "关闭洗涤剂自动投放";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "开启洗涤剂自动投放";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        //设定附加功能B
        String additionB = arrayData[15];
        int additionBInteger = Integer.parseInt(additionB,16);
        String additionBBinary = Integer.toBinaryString(additionBInteger);
        while (additionBBinary.length()<8){
            additionBBinary = "0"+additionBBinary;
        }
        //String additionAValue="";
        char ZeroB=additionBBinary.charAt(7);
        char FirstB=additionBBinary.charAt(6);
        char SecondB=additionBBinary.charAt(5);
        char ThirdB=additionBBinary.charAt(4);
        /*char FourthB=additionABinary.charAt(3);
        char FifthB=additionABinary.charAt(2);
        char SixthB=additionABinary.charAt(1);//未使用
        char SeventhB=additionABinary.charAt(0);*/
        switch (ZeroB){
            case '0':
                washOrderCommand = "关闭柔顺剂自动投放";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "开启柔顺剂自动投放";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (FirstB){
            case '0':
                washOrderCommand = "净水洗开启";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "净水洗关闭";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (SecondB){
            case '0':
                washOrderCommand = "关闭预约功能";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "开启预约功能";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (ThirdB){
            case '0':
                washOrderCommand = "童锁解锁";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "童锁上锁";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (Fourth){
            case '0':
                washOrderCommand = "防过敏关闭";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "防过敏开启";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        //程序运行阶段
        String stage = arrayData[16];
        switch(stage){
            case "00":
                washOrderCommand = "待机";
                break;
            case "01":
                washOrderCommand = "称重";
                break;
            case "02":
                washOrderCommand = "重量提示";
                break;
            case "03":
                washOrderCommand = "洗涤进水";
                break;
            case "04":
                washOrderCommand = "洗涤加热";
                break;
            case "05":
                washOrderCommand = "洗涤";
                break;
            case "06":
                washOrderCommand = "洗涤排水";
                break;
            case "07":
                washOrderCommand = "中间脱水";
                break;
            case "08":
                washOrderCommand = "漂洗进水";
                break;
            case "09":
                washOrderCommand = "漂洗";
                break;
            case "0A":
                washOrderCommand = "漂洗排水";
                break;
            case "0B":
                washOrderCommand = "最终脱水";
                break;
            case "0C":
                washOrderCommand = "烘干";
                break;
            case "0D":
                washOrderCommand = "冷却";
                break;
            case "0E":
                washOrderCommand = "结束";
                break;
            case "0F":
                washOrderCommand = "预约运行中";
                break;
            case "10":
                washOrderCommand = "洗衣程序运行完抖散中";
                break;
            case "11":
                washOrderCommand = "洗衣程序运行完烘干中";
                break;
            case "12":
                washOrderCommand = "洗衣程序运行完烘干结束";
                break;
            case "13":
                washOrderCommand = "洗衣程序运行完抖散结束";
                break;
        }
        result += countNum+":"+washOrderCommand+"@";
        countNum++;
        //状态1
        String state1 = arrayData[17];
        int state1Integer = Integer.parseInt(state1,16);
        String state1Binary = Integer.toBinaryString(state1Integer);
        while (state1Binary.length()<8){
            state1Binary = "0"+state1Binary;
        }
        //String additionAValue="";
        char statusZero=state1Binary.charAt(7);
        char statusFirst=state1Binary.charAt(6);
        char statusSecond=state1Binary.charAt(5);//未使用
        char statusThird=state1Binary.charAt(4);
        char statusFourth=state1Binary.charAt(3);
        char statusFifth=state1Binary.charAt(2);
        char statusSixth=state1Binary.charAt(1);//未使用
        char statusSeventh=state1Binary.charAt(0);
        switch (statusZero){
            case '0':
                washOrderCommand = "关机";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "开机";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (statusFirst){
            case '0':
                washOrderCommand = "远程控制功能无效";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "远程控制功能有效";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (statusSecond){
            case '0':
                washOrderCommand = "无强制删除";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "有强制删除";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (statusFourth){
            case '0':
                washOrderCommand = "未设定延时待机";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "已设定延时待机";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (statusFifth){
            case '0':
                washOrderCommand = "门锁解锁";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "门锁上锁";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (statusSixth){
            case '0':
                washOrderCommand = "程序未运行";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "程序已运行";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (statusSeventh){
            case '0':
                washOrderCommand = "暂停";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "启动";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        //状态2
        String state2 = arrayData[18];
        int state2Integer = Integer.parseInt(state2,16);
        String state2Binary = Integer.toBinaryString(state2Integer);
        while (state2Binary.length()<8){
            state2Binary = "0"+state2Binary;
        }
        //String additionAValue="";
        char status2Zero=state2Binary.charAt(7);
        char status2First=state2Binary.charAt(6);
        char status2Second=state2Binary.charAt(5);//未使用
        char status2Third=state2Binary.charAt(4);
        char status2Fourth=state2Binary.charAt(3);
        char status2Fifth=state2Binary.charAt(2);
        char status2Sixth=state2Binary.charAt(1);//未使用
        char status2Seventh=state2Binary.charAt(0);
        switch (status2Zero){
            case '0':
                washOrderCommand = "桶门打开";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "桶门关闭";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (status2First){
            case '0':
                washOrderCommand = "无洗衣程序运行完抖散";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "有洗衣程序运行完抖散";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (status2Second){
            case '0':
                washOrderCommand = "无洗衣程序运行完烘干";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "有洗衣程序运行完烘干";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (status2Third){
            case '0':
                washOrderCommand = "无需要干洗的衣物";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "有需要干洗的衣物";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        //第四位无
        /*switch (status2Fourth){
            case '0':
                washOrderCommand = "未设定延时待机";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "已设定延时待机";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }*/
        switch (status2Fifth){
            case '0':
                washOrderCommand = "没有接受到生产测试命令";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "接收到生产测试命令";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (status2Sixth){
            case '0':
                washOrderCommand = "无减漂洗工作";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "有减漂洗工作";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (status2Seventh){
            case '0':
                washOrderCommand = "无增漂洗工作";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "有增漂洗工作";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        //当前剩余/预约时间的剩余小时部分
        String remainPrectime = arrayData[19];
        int remainPrectimeInt = Integer.parseInt(remainPrectime,16);
        int minites = remainPrectimeInt * 60;
        if(remainPrectimeInt>=0&&remainPrectimeInt<=24) {
            result += countNum + ":" + String.valueOf(remainPrectimeInt) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //当前剩余/预约时间的剩余分钟部分
        String remainPrectimeMinute = arrayData[20];
        int remainPrectimeMinuteInt = Integer.parseInt(remainPrectimeMinute,16);
        if(remainPrectimeMinuteInt>=0&&remainPrectimeMinuteInt<=59) {
            result += countNum + ":" + String.valueOf(remainPrectimeMinuteInt) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //提示信息
        String message = arrayData[21];
        switch (message) {
            case "00":
                washOrderCommand = "无";
                break;
            case "01":
                washOrderCommand = "衣服已洗完";
                break;
            case "02":
                washOrderCommand = "衣服已洗干";
                break;
            case "03":
                washOrderCommand = "液体洗涤剂用完";
                break;
            case "04":
                washOrderCommand = "软化剂用完";
                break;
            case "05":
                washOrderCommand = "架干燥使用说明";
                break;
            case "06":
                washOrderCommand = "请关闭抽屉门";
                break;
            case "07":
                washOrderCommand = "称重完成,请在分配器盒内加入适量洗衣粉";
                break;
            case "08":
                washOrderCommand = "桶内温度过高，不能开门";
                break;
            case "09":
                washOrderCommand = "桶内水位过高，不能开门";
                break;
            case "0A":
                washOrderCommand = "泡沫过多正进行消泡处理";
                break;
            case "0B":
                washOrderCommand = "消毒剂用完";
                break;
            case "0C":
                washOrderCommand = "负离子已完成";
                break;
            case "0D":
                washOrderCommand = "液体洗涤剂,软化剂用完";
                break;
            case "0E":
                washOrderCommand = "排水过滤器需要清理";
                break;
            case "0F":
                washOrderCommand = "烘干过滤器需要清理";
                break;
            case "10":
                washOrderCommand = "请使用桶自洁程序,进行桶内清洗";
                break;
            case "11":
                washOrderCommand = "门被打开,远程控制功能失效";
                break;
            case "12":
                washOrderCommand = "程序已运行达到指定舟曲，请清理排水过滤器";
                break;
            case "13":
                washOrderCommand = "干洗叫单提醒";
                break;
            default:
                washOrderCommand = "N";
                break;

        }
        result += countNum+":"+washOrderCommand+"@";
        countNum++;
        //累计周期内洗涤次数
        String washNum = arrayData[22] + arrayData[23];
        int washNumInteger = Integer.parseInt(washNum,16);
        if(washNumInteger>=0&&washNumInteger<=65535){
            result += countNum + ":" + String.valueOf(washNumInteger) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //累计洗涤周期
        String washCycle = arrayData[24] + arrayData[25];
        int washCycleInteger = Integer.parseInt(washCycle,16);
        if(washCycleInteger>=0&&washCycleInteger<=65535){
            result += countNum + ":" + String.valueOf(washCycleInteger) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //本次用水量
        String UseWater = arrayData[26] + arrayData[27];
        System.out.println("本次用水量:"+UseWater);
        int UseWaterInteger = Integer.parseInt(UseWater,16);
        if(UseWaterInteger>=0&&UseWaterInteger<=65535){
            result += countNum + ":" + String.valueOf(UseWaterInteger) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //累计用水量
        String useWaterTotal = arrayData[28] + arrayData[29] + arrayData[30] + arrayData[31];
        Long useWaterTotalLong = Long.parseLong(useWaterTotal,16);
        if(useWaterTotalLong>=0&&useWaterTotalLong<=4294967295L){
            result += countNum + ":" + String.valueOf(useWaterTotalLong) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //本次用电量
        String useElectricity = arrayData[32] + arrayData[33];
        System.out.println("本次用电量:"+useElectricity);
        int useElectricityInteger = Integer.parseInt(useElectricity,16);
        if(useElectricityInteger>=0&&useElectricityInteger<=65535){
            result += countNum + ":" + String.valueOf(useElectricityInteger) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //累计用电量
        String useElectricityTotal = arrayData[34] + arrayData[35] + arrayData[36] + arrayData[37];
        Long useElectricityTotalLong = Long.parseLong(useElectricityTotal,16);
        if(useElectricityTotalLong>=0&&useElectricityTotalLong<=4294967295L){
            result += countNum + ":" + String.valueOf(useElectricityTotalLong) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //特殊功能
        String special = arrayData[38];
        int specialInteger = Integer.parseInt(special,16);
        String specialBinary = Integer.toBinaryString(specialInteger);
        while (specialBinary.length()<8){
            specialBinary = "0"+specialBinary;
        }
        char specialZero=specialBinary.charAt(7);
        char specialFirst=specialBinary.charAt(6);
        char specialSecond=specialBinary.charAt(5);//未使用
        char specialThird=specialBinary.charAt(4);
        switch (specialZero){
            case '0':
                washOrderCommand = "关闭运动鞋负离子功能";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "开启运动鞋负离子功能";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (specialFirst){
            case '0':
                washOrderCommand = "关闭衣物负离子功能";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "开启衣物负离子功能";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (specialSecond){
            case '0':
                washOrderCommand = "关闭袜子负离子功能";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "开启袜子负离子功能";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (specialThird){
            case '0':
                washOrderCommand = "关闭玩具负离子功能";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "开启玩具负离子功能";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        //剩余漂洗次数
        String reaminWash = arrayData[39];
        int reaminWashInteger = Integer.parseInt(reaminWash,16);
        if(reaminWashInteger>=0&&reaminWashInteger<=10){
            result += countNum + ":" + String.valueOf(reaminWashInteger) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //设定衣物重量
        String clothesWeight = arrayData[40];
        int clothesWeightInteger = Integer.parseInt(clothesWeight,16);
        if(clothesWeightInteger>=0&&clothesWeightInteger<=25){
            result += countNum + ":" + String.valueOf(clothesWeightInteger) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //洗涤剂类型（协议有问题,占41数组）
        String detergentType = arrayData[41];
        int detergentTypeInteger = Integer.parseInt(detergentType,16);
        switch(detergentTypeInteger){
            case 0:
                washOrderCommand = "普通洗涤剂";
                break;
            case 1:
                washOrderCommand = "浓缩洗涤剂";
                break;
        }
        result += countNum+":"+washOrderCommand+"@";
        countNum++;
        //设定洗涤温度
        String washTemperture = arrayData[42];
        int washTempertureInteger = Integer.parseInt(washTemperture,16);
        if(washTempertureInteger>=0&&washTempertureInteger<=100){
            result += countNum + ":" + String.valueOf(washTempertureInteger) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //剩余主洗时间
        String washMainTime = arrayData[43];
        int washMainTimeInteger = Integer.parseInt(washMainTime,16);
        if(washMainTimeInteger>=0&&washMainTimeInteger<=180){
            result += countNum + ":" + String.valueOf(washMainTimeInteger) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //设定脏度
        String dirtyValue = arrayData[44];
        switch(dirtyValue){
            case "00":
                washOrderCommand="不设定脏污度";
                break;
            case "01":
                washOrderCommand="自动测定脏污度,自动添加洗涤剂";
                break;
            case "02":
                washOrderCommand="轻度脏污,自动添加洗涤剂";
                break;
            case "03":
                washOrderCommand="中度脏污,自动添加洗涤剂";
                break;
            case "04":
                washOrderCommand="重度脏污,自动添加洗涤剂";
                break;
            default:
                washOrderCommand="N";
                break;
        }
        result += countNum+":"+washOrderCommand+"@";
        countNum++;
        //附加功能
        String additionFunction = arrayData[45];
        int additionFunctionInteger = Integer.parseInt(additionFunction,16);
        String additionFunctionBinary = Integer.toBinaryString(additionFunctionInteger);
        while (additionFunctionBinary.length()<8){
            additionFunctionBinary = "0"+additionFunctionBinary;
        }
        char additionFunctionZero=additionFunctionBinary.charAt(7);
        char additionFunctionFirst=additionFunctionBinary.charAt(6);
        char additionFunctionSecond=additionFunctionBinary.charAt(5);//未用到
        char additionFunctionThird=additionFunctionBinary.charAt(4);
        char additionFunctionForth=additionFunctionBinary.charAt(3);
        char additionFunctionFifth=additionFunctionBinary.charAt(2);
        char additionFunctionSixth=additionFunctionBinary.charAt(1);
        char additionFunctionSeventh=additionFunctionBinary.charAt(0);
        switch (additionFunctionZero){
            case '0':
                washOrderCommand = "高水位关闭";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "高水位开启";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (additionFunctionFirst){
            case '0':
                washOrderCommand = "免熨烫关闭";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "免熨烫开启";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        /*switch (additionFunctionSecond){
            case '0':
                washOrderCommand = "关闭袜子负离子功能";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "开启袜子负离子功能";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }*/
        switch (additionFunctionThird){
            case '0':
                washOrderCommand = "节能洗关闭";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "节能洗开启";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (additionFunctionForth){
            case '0':
                washOrderCommand = "加速洗关闭";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "加速洗开启";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (additionFunctionFifth){
            case '0':
                washOrderCommand = "浸泡洗关闭";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "浸泡洗开启";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (additionFunctionSixth){
            case '0':
                washOrderCommand = "夜间洗关闭";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "夜间洗开启";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (additionFunctionSeventh){
            case '0':
                washOrderCommand = "防皱浸泡关闭";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "防皱浸泡开启";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        //特渍种类
        String specialStains = arrayData[46];
        switch (specialStains) {
            case "00":
                washOrderCommand = "不设定";
                break;
            case "01":
                washOrderCommand = "酒渍";
                break;
            case "02":
                washOrderCommand = "草渍";
                break;
            case "03":
                washOrderCommand = "泥土渍";
                break;
            case "04":
                washOrderCommand = "血渍";
                break;
            case "05":
                washOrderCommand = "奶渍";
                break;
            case "06":
                washOrderCommand = "烹饪渍";
                break;
            case "07":
                washOrderCommand = "茶渍";
                break;
            case "08":
                washOrderCommand = "咖啡";
                break;
            case "09":
                washOrderCommand = "巧克力渍";
                break;
            case "0A":
                washOrderCommand = "唇彩";
                break;
            case "0B":
                washOrderCommand = "咖喱渍";
                break;
            case "0C":
                washOrderCommand = "奶茶";
                break;
            case "0D":
                washOrderCommand = "辣椒油";
                break;
            case "0E":
                washOrderCommand = "蓝墨水";
                break;
            case "0F":
                washOrderCommand = "水彩笔";
                break;
            case "10":
                washOrderCommand = "鞋油";
                break;
            case "11":
                washOrderCommand = "油画棒";
                break;
            case "12":
                washOrderCommand = "蓝莓";
                break;
            case "13":
                washOrderCommand = "汗渍";
                break;
            case "14":
                washOrderCommand = "蛋渍";
                break;
            case "15":
                washOrderCommand = "番茄酱";
                break;
            case "16":
                washOrderCommand = "婴儿食物";
                break;
            case "17":
                washOrderCommand = "酱油渍";
                break;
            case "18":
                washOrderCommand = "豆瓣酱";
                break;
            case "19":
                washOrderCommand = "辣椒酱";
                break;
            case "1A":
                washOrderCommand = "果渍";
                break;
            default:
                washOrderCommand = "N";
                break;
        }
        result += countNum+":"+washOrderCommand+"@";
        countNum++;
        //剩余待机时间高位字节 47
        //剩余待机时间低位字节 48
        String remainTime = arrayData[47]+arrayData[48];
        int remainTimeInteger = Integer.parseInt(remainTime,16);
        result += countNum+":"+remainTimeInteger+"@";
        countNum++;
        //设定脱水转速
        String spinRpm = arrayData[49];
        int spinRpmIntegerTemp = Integer.parseInt(spinRpm,16);
        int spinRpmInteger = spinRpmIntegerTemp * 10;
        if(spinRpmInteger>=0&&spinRpmInteger<=1600){
            result += countNum + ":" + String.valueOf(spinRpmInteger) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //洗涤剂投放量
        String wordu = arrayData[50];
        int worduInteger = Integer.parseInt(wordu,16);
        if(worduInteger>=0&&worduInteger<=255){
            result += countNum + ":" + String.valueOf(worduInteger) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //柔顺剂投放量
        String roushunwordu = arrayData[51];
        int roushunworduInteger = Integer.parseInt(roushunwordu,16);
        if(roushunworduInteger>=0&&roushunworduInteger<=255){
            result += countNum + ":" + String.valueOf(roushunworduInteger) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //设定的洗涤转速
        String speed = arrayData[52];
        int speedInteger = Integer.parseInt(speed,16);
        if(speedInteger>=0&&speedInteger<=255){
            result += countNum + ":" + String.valueOf(speedInteger) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //实测衣物重量
        String weight = arrayData[53];
        int weightInteger = Integer.parseInt(weight,16);
        if(weightInteger>=0&&weightInteger<=255){
            result += countNum + ":" + String.valueOf(weightInteger) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //洗涤剂投放比例
        String detergentPercent = arrayData[54];
        int detergentPercentInteger = Integer.parseInt(detergentPercent,16);
        if(detergentPercentInteger>=0&&detergentPercentInteger<=255){
            result += countNum + ":" + String.valueOf(detergentPercentInteger) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //预留




        return result;
    }
    public String get7DData(String rawData){
        rawData = rawData.replaceAll(" +"," ");
        String arrayData[] = rawData.split(" ");
        //洗衣命令
        String washOrderCommand;
        String result = "";
        Integer countNum = 1;
        //洗衣程序
        String washProg = arrayData[12];
        switch (washProg){
            case "00":
                washOrderCommand="空流程";
                break;
            case "01":
                washOrderCommand="棉麻";
                break;
            case "02":
                washOrderCommand="化纤";
                break;
            case "03":
                washOrderCommand="羽绒";
                break;
            case "04":
                washOrderCommand="窗帘";
                break;
            case "05":
                washOrderCommand="混合";
                break;
            case "06":
                washOrderCommand="衬衣";
                break;
            case "07":
                washOrderCommand="童装";
                break;
            case "08":
                washOrderCommand="轻柔/丝绸";
                break;
            case "09":
                washOrderCommand="烫烫净/煮洗";
                break;
            case "0A":
                washOrderCommand="羊毛";
                break;
            case "0B":
                washOrderCommand="牛仔";
                break;
            case "0C":
                washOrderCommand="空气洗";
                break;
            case "0D":
                washOrderCommand="筒自洁";
                break;
            case "0E":
                washOrderCommand="内衣";
                break;
            case "0F":
                washOrderCommand="快速洗/速洗";
                break;
            case "10":
                washOrderCommand="快洗29";
                break;
            case "11":
                washOrderCommand="大物/大件洗";
                break;
            case "12":
                washOrderCommand="运动服";
                break;
            case "13":
                washOrderCommand="摇篮柔洗";
                break;
            case "14":
                washOrderCommand="爱婴洗/婴儿服";
                break;
            case "15":
                washOrderCommand="及时洗/日常洗";
                break;
            case "16":
                washOrderCommand="真丝";
                break;
            case "17":
                washOrderCommand="记忆洗";
                break;
            case "18":
                washOrderCommand="护色洗";
                break;
            case "19":
                washOrderCommand="手洗";
                break;
            case "1A":
                washOrderCommand="毛巾洗/小件洗";
                break;
            case "1B":
                washOrderCommand="单漂洗";
                break;
            case "1C":
                washOrderCommand="单脱水";
                break;
            case "1D":
                washOrderCommand="单烘干";
                break;
            case "1E":
                washOrderCommand="单排水";
                break;
            case "1F":
                washOrderCommand="床单/被罩";
                break;
            case "20":
                washOrderCommand="户外服/休闲服";
                break;
            case "21":
                washOrderCommand="夜洗";
                break;
            case "22":
                washOrderCommand="架干燥";
                break;
            case "23":
                washOrderCommand="抖散";
                break;
            case "24":
                washOrderCommand="护肤洗";
                break;
            case "25":
                washOrderCommand="消毒洗";
                break;
            case "26":
                washOrderCommand="高端专属洗";
                break;
            case "27":
                washOrderCommand="快洗58";
                break;
            case "28":
                washOrderCommand="加强洗";
                break;
            case "29":
                washOrderCommand="熨烫";
                break;
            case "2A":
                washOrderCommand="小太阳";
                break;
            case "2B":
                washOrderCommand="定时烘干";
                break;
            case "2C":
                washOrderCommand="衣架烘干";
                break;
            case "2D":
                washOrderCommand="卡片洗";
                break;
            case "2E":
                washOrderCommand="巨浪洗";
                break;
            case "2F":
                washOrderCommand="欧标棉麻";
                break;
            case "30":
                washOrderCommand="欧标化纤";
                break;
            case "31":
                washOrderCommand="防过敏";
                break;
            case "32":
                washOrderCommand="除异味";
                break;
            case "33":
                washOrderCommand="时间洗";
                break;
            case "34":
                washOrderCommand="冲锋衣";
                break;
            case "35":
                washOrderCommand="APP自诊断";
                break;
            case "36":
                washOrderCommand="毛毯洗";
                break;
            case "37":
                washOrderCommand="Standard";
                break;
            case "38":
                washOrderCommand="本机智慧洗";
                break;
            case "39":
                washOrderCommand="智慧云洗";
                break;
            case "3A":
                washOrderCommand="浴巾";
                break;
            case "3B":
                washOrderCommand="紫外除菌";
                break;
            default:
                washOrderCommand="N";
                break;

        }
        result += countNum+":"+washOrderCommand+"@";
        countNum++;
        //设定烘干程序
        String dryPro = arrayData[13];
        switch (dryPro){
            case "00":
                washOrderCommand = "无烘干过程";
                break;
            case "01":
                washOrderCommand = "强烘";
                break;
            case "02":
                washOrderCommand = "弱烘";
                break;
            case "03":
                washOrderCommand = "熨烫";
                break;
            case "04":
                washOrderCommand = "120分钟烘干";
                break;
            case "05":
                washOrderCommand = "90分钟烘干";
                break;
            case "06":
                washOrderCommand = "60分钟烘干";
                break;
            case "07":
                washOrderCommand = "30分钟烘干";
                break;
            case "08":
                washOrderCommand = "150分钟烘干";
                break;
            case "09":
                washOrderCommand = "180分钟烘干";
                break;
            case "0A":
                washOrderCommand = "智能烘干";
                break;
            default:
                washOrderCommand="N";
                break;
        }
        result += countNum + ":" +washOrderCommand+"@";
        countNum++;
        //设定附加控制功能A
        String additionA = arrayData[14];
        int additionAInteger = Integer.parseInt(additionA,16);
        String additionABinary = Integer.toBinaryString(additionAInteger);
        while (additionABinary.length()<8){
            additionABinary = "0"+additionABinary;
        }
        //String additionAValue="";
        char Zero=additionABinary.charAt(7);
        char First=additionABinary.charAt(6);
        char Second=additionABinary.charAt(5);//未使用
        char Third=additionABinary.charAt(4);
        char Fourth=additionABinary.charAt(3);
        char Fifth=additionABinary.charAt(2);
        char Sixth=additionABinary.charAt(1);//未使用
        char Seventh=additionABinary.charAt(0);
        switch (Zero){
            case '0':
                washOrderCommand = "蜂鸣音静音(不蜂鸣)";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "蜂鸣音不静音(蜂鸣)";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (First){
            case '0':
                washOrderCommand = "非智慧洗衣程序";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "智慧洗衣程序";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (Third){
            case '0':
                washOrderCommand = "关闭语音功能";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "开启语音功能";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (Fourth){
            case '0':
                washOrderCommand = "关闭强力去污/超净洗功能";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "开启强力去污/超净洗功能";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (Fifth){
            case '0':
                washOrderCommand = "关闭消毒剂自动投放";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "开启消毒剂自动投放";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (Seventh){
            case '0':
                washOrderCommand = "关闭洗涤剂自动投放";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "开启洗涤剂自动投放";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        //设定附加功能B
        String additionB = arrayData[15];
        int additionBInteger = Integer.parseInt(additionB,16);
        String additionBBinary = Integer.toBinaryString(additionBInteger);
        while (additionBBinary.length()<8){
            additionBBinary = "0"+additionBBinary;
        }
        //String additionAValue="";
        char ZeroB=additionBBinary.charAt(7);
        char FirstB=additionBBinary.charAt(6);
        char SecondB=additionBBinary.charAt(5);
        char ThirdB=additionBBinary.charAt(4);
        /*char FourthB=additionABinary.charAt(3);
        char FifthB=additionABinary.charAt(2);
        char SixthB=additionABinary.charAt(1);//未使用
        char SeventhB=additionABinary.charAt(0);*/
        switch (ZeroB){
            case '0':
                washOrderCommand = "关闭柔顺剂自动投放";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "开启柔顺剂自动投放";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (FirstB){
            case '0':
                washOrderCommand = "净水洗开启";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "净水洗关闭";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (SecondB){
            case '0':
                washOrderCommand = "关闭预约功能";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "开启预约功能";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (ThirdB){
            case '0':
                washOrderCommand = "童锁解锁";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "童锁上锁";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (Fourth){
            case '0':
                washOrderCommand = "防过敏关闭";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "防过敏开启";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        //程序运行阶段
        String stage = arrayData[16];
        switch(stage){
            case "00":
                washOrderCommand = "待机";
                break;
            case "01":
                washOrderCommand = "称重";
                break;
            case "02":
                washOrderCommand = "重量提示";
                break;
            case "03":
                washOrderCommand = "洗涤进水";
                break;
            case "04":
                washOrderCommand = "洗涤加热";
                break;
            case "05":
                washOrderCommand = "洗涤";
                break;
            case "06":
                washOrderCommand = "洗涤排水";
                break;
            case "07":
                washOrderCommand = "中间脱水";
                break;
            case "08":
                washOrderCommand = "漂洗进水";
                break;
            case "09":
                washOrderCommand = "漂洗";
                break;
            case "0A":
                washOrderCommand = "漂洗排水";
                break;
            case "0B":
                washOrderCommand = "最终脱水";
                break;
            case "0C":
                washOrderCommand = "烘干";
                break;
            case "0D":
                washOrderCommand = "冷却";
                break;
            case "0E":
                washOrderCommand = "结束";
                break;
            case "0F":
                washOrderCommand = "预约运行中";
                break;
            case "10":
                washOrderCommand = "洗衣程序运行完抖散中";
                break;
            case "11":
                washOrderCommand = "洗衣程序运行完烘干中";
                break;
            case "12":
                washOrderCommand = "洗衣程序运行完烘干结束";
                break;
            case "13":
                washOrderCommand = "洗衣程序运行完抖散结束";
                break;
        }
        result += countNum+":"+washOrderCommand+"@";
        countNum++;
        //状态1
        String state1 = arrayData[17];
        int state1Integer = Integer.parseInt(state1,16);
        String state1Binary = Integer.toBinaryString(state1Integer);
        while (state1Binary.length()<8){
            state1Binary = "0"+state1Binary;
        }
        //String additionAValue="";
        char statusZero=state1Binary.charAt(7);
        char statusFirst=state1Binary.charAt(6);
        char statusSecond=state1Binary.charAt(5);//未使用
        char statusThird=state1Binary.charAt(4);
        char statusFourth=state1Binary.charAt(3);
        char statusFifth=state1Binary.charAt(2);
        char statusSixth=state1Binary.charAt(1);//未使用
        char statusSeventh=state1Binary.charAt(0);
        switch (statusZero){
            case '0':
                washOrderCommand = "关机";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "开机";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (statusFirst){
            case '0':
                washOrderCommand = "远程控制功能无效";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "远程控制功能有效";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (statusSecond){
            case '0':
                washOrderCommand = "无强制删除";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "有强制删除";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (statusFourth){
            case '0':
                washOrderCommand = "未设定延时待机";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "已设定延时待机";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (statusFifth){
            case '0':
                washOrderCommand = "门锁解锁";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "门锁上锁";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (statusSixth){
            case '0':
                washOrderCommand = "程序未运行";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "程序已运行";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (statusSeventh){
            case '0':
                washOrderCommand = "暂停";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "启动";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        //状态2
        String state2 = arrayData[18];
        int state2Integer = Integer.parseInt(state2,16);
        String state2Binary = Integer.toBinaryString(state2Integer);
        while (state2Binary.length()<8){
            state2Binary = "0"+state2Binary;
        }
        //String additionAValue="";
        char status2Zero=state2Binary.charAt(7);
        char status2First=state2Binary.charAt(6);
        char status2Second=state2Binary.charAt(5);//未使用
        char status2Third=state2Binary.charAt(4);
        char status2Fourth=state2Binary.charAt(3);
        char status2Fifth=state2Binary.charAt(2);
        char status2Sixth=state2Binary.charAt(1);//未使用
        char status2Seventh=state2Binary.charAt(0);
        switch (status2Zero){
            case '0':
                washOrderCommand = "桶门打开";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "桶门关闭";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (status2First){
            case '0':
                washOrderCommand = "无洗衣程序运行完抖散";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "有洗衣程序运行完抖散";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (status2Second){
            case '0':
                washOrderCommand = "无洗衣程序运行完烘干";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "有洗衣程序运行完烘干";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (status2Third){
            case '0':
                washOrderCommand = "无需要干洗的衣物";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "有需要干洗的衣物";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        //第四位无
        /*switch (status2Fourth){
            case '0':
                washOrderCommand = "未设定延时待机";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "已设定延时待机";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }*/
        switch (status2Fifth){
            case '0':
                washOrderCommand = "没有接受到生产测试命令";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "接收到生产测试命令";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (status2Sixth){
            case '0':
                washOrderCommand = "无减漂洗工作";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "有减漂洗工作";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (status2Seventh){
            case '0':
                washOrderCommand = "无增漂洗工作";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "有增漂洗工作";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        //当前剩余/预约时间的剩余小时部分
        String remainPrectime = arrayData[19];
        int remainPrectimeInt = Integer.parseInt(remainPrectime,16);
        int miniute = remainPrectimeInt * 60;
       /* if(remainPrectimeInt>=0&&remainPrectimeInt<=24) {
            result += countNum + ":" + String.valueOf(remainPrectimeInt) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }*/
        //当前剩余/预约时间的剩余分钟部分
        String remainPrectimeMinute = arrayData[20];
        int remainPrectimeMinuteInt = Integer.parseInt(remainPrectimeMinute,16);
        /*if(remainPrectimeMinuteInt>=0&&remainPrectimeMinuteInt<=59) {
            result += countNum + ":" + String.valueOf(remainPrectimeMinuteInt) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }*/
        int totalminiute = (remainPrectimeMinuteInt + miniute);
        String command = String.valueOf(totalminiute);
        result += countNum+":"+command+"@";
        countNum++;
        //提示信息
        String message = arrayData[21];
        switch (message) {
            case "00":
                washOrderCommand = "无";
                break;
            case "01":
                washOrderCommand = "衣服已洗完";
                break;
            case "02":
                washOrderCommand = "衣服已洗干";
                break;
            case "03":
                washOrderCommand = "液体洗涤剂用完";
                break;
            case "04":
                washOrderCommand = "软化剂用完";
                break;
            case "05":
                washOrderCommand = "架干燥使用说明";
                break;
            case "06":
                washOrderCommand = "请关闭抽屉门";
                break;
            case "07":
                washOrderCommand = "称重完成,请在分配器盒内加入适量洗衣粉";
                break;
            case "08":
                washOrderCommand = "桶内温度过高，不能开门";
                break;
            case "09":
                washOrderCommand = "桶内水位过高，不能开门";
                break;
            case "0A":
                washOrderCommand = "泡沫过多正进行消泡处理";
                break;
            case "0B":
                washOrderCommand = "消毒剂用完";
                break;
            case "0C":
                washOrderCommand = "负离子已完成";
                break;
            case "0D":
                washOrderCommand = "液体洗涤剂,软化剂用完";
                break;
            case "0E":
                washOrderCommand = "排水过滤器需要清理";
                break;
            case "0F":
                washOrderCommand = "烘干过滤器需要清理";
                break;
            case "10":
                washOrderCommand = "请使用桶自洁程序,进行桶内清洗";
                break;
            case "11":
                washOrderCommand = "门被打开,远程控制功能失效";
                break;
            case "12":
                washOrderCommand = "程序已运行达到指定舟曲，请清理排水过滤器";
                break;
            case "13":
                washOrderCommand = "干洗叫单提醒";
                break;
            default:
                washOrderCommand = "N";
                break;

        }
        result += countNum+":"+washOrderCommand+"@";
        countNum++;
        //累计周期内洗涤次数
        String washNum = arrayData[22] + arrayData[23];
        int washNumInteger = Integer.parseInt(washNum,16);
        if(washNumInteger>=0&&washNumInteger<=65535){
            result += countNum + ":" + String.valueOf(washNumInteger) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //累计洗涤周期
        String washCycle = arrayData[24] + arrayData[25];
        int washCycleInteger = Integer.parseInt(washCycle,16);
        if(washCycleInteger>=0&&washCycleInteger<=65535){
            result += countNum + ":" + String.valueOf(washCycleInteger) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //本次用水量
        String UseWater = arrayData[26] + arrayData[27];
        int UseWaterInteger = Integer.parseInt(UseWater,16);
        if(UseWaterInteger>=0&&UseWaterInteger<=65535){
            result += countNum + ":" + String.valueOf(UseWaterInteger) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //累计用水量
        String useWaterTotal = arrayData[28] + arrayData[29] + arrayData[30] + arrayData[31];
        Long useWaterTotalLong = Long.parseLong(useWaterTotal,16);
        if(useWaterTotalLong>=0&&useWaterTotalLong<=4294967295L){
            result += countNum + ":" + String.valueOf(useWaterTotalLong) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //本次用电量
        String useElectricity = arrayData[32] + arrayData[33];
        int useElectricityInteger = Integer.parseInt(useElectricity,16);
        if(useElectricityInteger>=0&&useElectricityInteger<=65535){
            result += countNum + ":" + String.valueOf(useElectricityInteger) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //累计用电量
        String useElectricityTotal = arrayData[34] + arrayData[35] + arrayData[36] + arrayData[37];
        Long useElectricityTotalLong = Long.parseLong(useElectricityTotal,16);
        if(useElectricityTotalLong>=0&&useElectricityTotalLong<=4294967295L){
            result += countNum + ":" + String.valueOf(useElectricityTotalLong) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //特殊功能
        String special = arrayData[38];
        int specialInteger = Integer.parseInt(special,16);
        String specialBinary = Integer.toBinaryString(specialInteger);
        while (specialBinary.length()<8){
            specialBinary = "0"+specialBinary;
        }
        char specialZero=specialBinary.charAt(7);
        char specialFirst=specialBinary.charAt(6);
        char specialSecond=specialBinary.charAt(5);//未使用
        char specialThird=specialBinary.charAt(4);
        switch (specialZero){
            case '0':
                washOrderCommand = "关闭运动鞋负离子功能";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "开启运动鞋负离子功能";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (specialFirst){
            case '0':
                washOrderCommand = "关闭衣物负离子功能";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "开启衣物负离子功能";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (specialSecond){
            case '0':
                washOrderCommand = "关闭袜子负离子功能";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "开启袜子负离子功能";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (specialThird){
            case '0':
                washOrderCommand = "关闭玩具负离子功能";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "开启玩具负离子功能";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        //剩余漂洗次数
        String reaminWash = arrayData[39];
        int reaminWashInteger = Integer.parseInt(reaminWash,16);
        if(reaminWashInteger>=0&&reaminWashInteger<=10){
            result += countNum + ":" + String.valueOf(reaminWashInteger) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //设定衣物重量
        String clothesWeight = arrayData[40];
        int clothesWeightInteger = Integer.parseInt(clothesWeight,16);
        if(clothesWeightInteger>=0&&clothesWeightInteger<=25){
            result += countNum + ":" + String.valueOf(clothesWeightInteger) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //洗涤剂类型（协议有问题,占41数组）
        String detergentType = arrayData[41];
        int detergentTypeInteger = Integer.parseInt(detergentType,16);
        switch(detergentTypeInteger){
            case 0:
                washOrderCommand = "普通洗涤剂";
                break;
            case 1:
                washOrderCommand = "浓缩洗涤剂";
                break;
        }
        result += countNum+":"+washOrderCommand+"@";
        countNum++;
        //设定洗涤温度
        String washTemperture = arrayData[42];
        int washTempertureInteger = Integer.parseInt(washTemperture,16);
        if(washTempertureInteger>=0&&washTempertureInteger<=100){
            result += countNum + ":" + String.valueOf(washTempertureInteger) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //剩余主洗时间
        String washMainTime = arrayData[43];
        int washMainTimeInteger = Integer.parseInt(washMainTime,16);
        if(washMainTimeInteger>=0&&washMainTimeInteger<=180){
            result += countNum + ":" + String.valueOf(washMainTimeInteger) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //设定脏污度
        String dirtyValue = arrayData[44];
        switch(dirtyValue){
            case "00":
                washOrderCommand="不设定脏污度";
                break;
            case "01":
                washOrderCommand="自动测定脏污度,自动添加洗涤剂";
                break;
            case "02":
                washOrderCommand="轻度脏污,自动添加洗涤剂";
                break;
            case "03":
                washOrderCommand="中度脏污,自动添加洗涤剂";
                break;
            case "04":
                washOrderCommand="重度脏污,自动添加洗涤剂";
                break;
            default:
                washOrderCommand="N";
                break;
        }
        result += countNum+":"+washOrderCommand+"@";
        countNum++;
        //附加功能
        String additionFunction = arrayData[45];
        int additionFunctionInteger = Integer.parseInt(additionFunction,16);
        String additionFunctionBinary = Integer.toBinaryString(additionFunctionInteger);
        while (additionFunctionBinary.length()<8){
            additionFunctionBinary = "0"+additionFunctionBinary;
        }
        char additionFunctionZero=additionFunctionBinary.charAt(7);
        char additionFunctionFirst=additionFunctionBinary.charAt(6);
        char additionFunctionSecond=additionFunctionBinary.charAt(5);//未用到
        char additionFunctionThird=additionFunctionBinary.charAt(4);
        char additionFunctionForth=additionFunctionBinary.charAt(3);
        char additionFunctionFifth=additionFunctionBinary.charAt(2);
        char additionFunctionSixth=additionFunctionBinary.charAt(1);
        char additionFunctionSeventh=additionFunctionBinary.charAt(0);
        switch (additionFunctionZero){
            case '0':
                washOrderCommand = "高水位关闭";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "高水位开启";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (additionFunctionFirst){
            case '0':
                washOrderCommand = "免熨烫关闭";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "免熨烫开启";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        /*switch (additionFunctionSecond){
            case '0':
                washOrderCommand = "关闭袜子负离子功能";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "开启袜子负离子功能";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }*/
        switch (additionFunctionThird){
            case '0':
                washOrderCommand = "节能洗关闭";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "节能洗开启";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (additionFunctionForth){
            case '0':
                washOrderCommand = "加速洗关闭";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "加速洗开启";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (additionFunctionFifth){
            case '0':
                washOrderCommand = "浸泡洗关闭";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "浸泡洗开启";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (additionFunctionSixth){
            case '0':
                washOrderCommand = "夜间洗关闭";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "夜间洗开启";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (additionFunctionSeventh){
            case '0':
                washOrderCommand = "防皱浸泡关闭";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "防皱浸泡开启";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        //特渍种类
        String specialStains = arrayData[46];
        switch (specialStains) {
            case "00":
                washOrderCommand = "不设定";
                break;
            case "01":
                washOrderCommand = "酒渍";
                break;
            case "02":
                washOrderCommand = "草渍";
                break;
            case "03":
                washOrderCommand = "泥土渍";
                break;
            case "04":
                washOrderCommand = "血渍";
                break;
            case "05":
                washOrderCommand = "奶渍";
                break;
            case "06":
                washOrderCommand = "烹饪渍";
                break;
            case "07":
                washOrderCommand = "茶渍";
                break;
            case "08":
                washOrderCommand = "咖啡";
                break;
            case "09":
                washOrderCommand = "巧克力渍";
                break;
            case "0A":
                washOrderCommand = "唇彩";
                break;
            case "0B":
                washOrderCommand = "咖喱渍";
                break;
            case "0C":
                washOrderCommand = "奶茶";
                break;
            case "0D":
                washOrderCommand = "辣椒油";
                break;
            case "0E":
                washOrderCommand = "蓝墨水";
                break;
            case "0F":
                washOrderCommand = "水彩笔";
                break;
            case "10":
                washOrderCommand = "鞋油";
                break;
            case "11":
                washOrderCommand = "油画棒";
                break;
            case "12":
                washOrderCommand = "蓝莓";
                break;
            case "13":
                washOrderCommand = "汗渍";
                break;
            case "14":
                washOrderCommand = "蛋渍";
                break;
            case "15":
                washOrderCommand = "番茄酱";
                break;
            case "16":
                washOrderCommand = "婴儿食物";
                break;
            case "17":
                washOrderCommand = "酱油渍";
                break;
            case "18":
                washOrderCommand = "豆瓣酱";
                break;
            case "19":
                washOrderCommand = "辣椒酱";
                break;
            case "1A":
                washOrderCommand = "果渍";
                break;
            default:
                washOrderCommand = "N";
                break;
        }
        result += countNum+":"+washOrderCommand+"@";
        countNum++;
        //剩余待机时间高位字节 47
        //剩余待机时间低位字节 48
        String remainTime = arrayData[47]+arrayData[48];
        int remainTimeInteger = Integer.parseInt(remainTime,16);
        result += countNum+":"+remainTimeInteger+"@";
        countNum++;
        //设定脱水转速
        String spinRpm = arrayData[49];
        int spinRpmIntegerTemp = Integer.parseInt(spinRpm,16);
        int spinRpmInteger = spinRpmIntegerTemp * 10;
        if(spinRpmInteger>=0&&spinRpmInteger<=1600){
            result += countNum + ":" + String.valueOf(spinRpmInteger) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //洗涤剂投放量
        String wordu = arrayData[50];
        int worduInteger = Integer.parseInt(wordu,16);
        if(worduInteger>=0&&worduInteger<=255){
            result += countNum + ":" + String.valueOf(worduInteger) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //柔顺剂投放量
        String roushunwordu = arrayData[51];
        int roushunworduInteger = Integer.parseInt(roushunwordu,16);
        if(roushunworduInteger>=0&&roushunworduInteger<=255){
            result += countNum + ":" + String.valueOf(roushunworduInteger) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //设定的洗涤转速
        String speed = arrayData[52];
        int speedInteger = Integer.parseInt(speed,16);
        if(speedInteger>=0&&speedInteger<=255){
            result += countNum + ":" + String.valueOf(speedInteger) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //实测衣物重量
        String weight = arrayData[53];
        int weightInteger = Integer.parseInt(weight,16);
        if(weightInteger>=0&&weightInteger<=255){
            result += countNum + ":" + String.valueOf(weightInteger) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //洗涤剂投放比例
        String detergentPercent = arrayData[54];
        int detergentPercentInteger = Integer.parseInt(detergentPercent,16);
        if(detergentPercentInteger>=0&&detergentPercentInteger<=255){
            result += countNum + ":" + String.valueOf(detergentPercentInteger) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //55预留 56 57预留
        //洗涤剂（传感器） + 柔顺剂（传感器）
        //洗涤剂(柔顺剂)
        String wordu7d = arrayData[58];
        int wordu7dInteger = Integer.parseInt(wordu7d,16);
        if(wordu7dInteger>=0&&wordu7dInteger<=255){
            result += countNum + ":" + String.valueOf(wordu7dInteger) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //柔顺剂(传感器)
        String roushunwordu7d = arrayData[59];
        int roushunwordu7dInteger = Integer.parseInt(roushunwordu7d,16);
        if(roushunwordu7dInteger>=0&&roushunwordu7dInteger<=255){
            result += countNum + ":" + String.valueOf(roushunwordu7dInteger) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //洗涤实际水温
        String waterTemputer = arrayData[60];
        int waterTemputerdInteger = Integer.parseInt(waterTemputer,16);
        if (waterTemputerdInteger>=0&&waterTemputerdInteger<=100){
            result += countNum+":"+waterTemputerdInteger+"@";
            countNum++;
        }else {
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //烘干入口温度
        String dryTemperatureIn = arrayData[61];
        int dryTemperatureInInteger = Integer.parseInt(dryTemperatureIn,16);
        if (dryTemperatureInInteger>=0&&dryTemperatureInInteger<=150){
            result += countNum+":"+dryTemperatureInInteger+"@";
            countNum++;
        }else {
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //烘干出口温度
        String dryTemperatureOut = arrayData[62];
        int dryTemperatureOutInteger = Integer.parseInt(dryTemperatureOut,16);
        if (dryTemperatureOutInteger>=0&&dryTemperatureOutInteger<=150){
            result += countNum+":"+dryTemperatureOutInteger+"@";
            countNum++;
        }else {
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //马达温度
        String motorTemperature = arrayData[63];
        int motorTemperatureInteger = Integer.parseInt(motorTemperature,16);
        if (motorTemperatureInteger>=0&&motorTemperatureInteger<=255){
            result += countNum+":"+motorTemperatureInteger+"@";
            countNum++;
        }else {
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //浊度值 Dirty AD Value(1byte)
        String dirtyAdValue = arrayData[64];
        int dirtyAdValueInteger = Integer.parseInt(dirtyAdValue,16);
        if (dirtyAdValueInteger>=0&&dirtyAdValueInteger<=255){
            result += countNum+":"+dirtyAdValueInteger+"@";
            countNum++;
        }else {
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //硬度值
        String rigidityAdValue = arrayData[65];
        int rigidityAdValueInteger = Integer.parseInt(rigidityAdValue,16);
        if (rigidityAdValueInteger>=0&&rigidityAdValueInteger<=255){
            result += countNum+":"+rigidityAdValueInteger+"@";
            countNum++;
        }else {
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //负载当前状态A
        String loadstateA = arrayData[66];
        int loadstateAInteger = Integer.parseInt(loadstateA,16);
        String loadstateABinary = Integer.toBinaryString(loadstateAInteger);
        while (loadstateABinary.length()<8){
            loadstateABinary = "0"+loadstateABinary;
        }
        char loadstateAZero=loadstateABinary.charAt(7);
        char loadstateAFirst=loadstateABinary.charAt(6);
        char loadstateASecond=loadstateABinary.charAt(5);//未用到
        char loadstateAThird=loadstateABinary.charAt(4);
        char loadstateAForth=loadstateABinary.charAt(3);
        char loadstateAFifth=loadstateABinary.charAt(2);
        char loadstateASixth=loadstateABinary.charAt(1);
        char loadstateASeventh=loadstateABinary.charAt(0);
        switch (loadstateAZero){
            case '0':
                washOrderCommand = "排水泵断电";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "排水泵通电";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (loadstateAFirst){
            case '0':
                washOrderCommand = "门锁断电";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "门锁通电";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (loadstateASecond){
            case '0':
                washOrderCommand = "冷凝阀断电";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "冷凝阀通电";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (loadstateAThird){
            case '0':
                washOrderCommand = "软化阀断电";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "软化阀通电";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (loadstateAForth){
            case '0':
                washOrderCommand = "主洗阀断电";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "主洗阀通电";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (loadstateAFifth){
            case '0':
                washOrderCommand = "烘干加热丝1断电";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "烘干加热丝1通电";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (loadstateASixth){
            case '0':
                washOrderCommand = "水加热丝断电";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "水加热丝通电";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (loadstateASeventh){
            case '0':
                washOrderCommand = "主继电器断电";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "主继电器通电";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        //负载当前状态B
        String loadstateB = arrayData[67];
        int loadstateBInteger = Integer.parseInt(loadstateB,16);
        String loadstateBBinary = Integer.toBinaryString(loadstateBInteger);
        while (loadstateBBinary.length()<8){
            loadstateBBinary = "0"+loadstateBBinary;
        }
        char loadstateBZero=loadstateBBinary.charAt(7);
        char loadstateBFirst=loadstateBBinary.charAt(6);
        char loadstateBSecond=loadstateBBinary.charAt(5);//未用到
        char loadstateBThird=loadstateBBinary.charAt(4);
        char loadstateBForth=loadstateBBinary.charAt(3);
        char loadstateBFifth=loadstateBBinary.charAt(2);
        char loadstateBSixth=loadstateBBinary.charAt(1);
        char loadstateBSeventh=loadstateBBinary.charAt(0);
        switch (loadstateBZero){
            case '0':
                washOrderCommand = "预洗阀断电";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "预洗阀通电";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (loadstateBFirst){
            case '0':
                washOrderCommand = "风扇断电";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "风扇通电";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (loadstateBSecond){
            case '0':
                washOrderCommand = "臭氧发生器B断电";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "臭氧发生器B通电";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (loadstateBThird){
            case '0':
                washOrderCommand = "臭氧发生器A断电";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "臭氧发生器A通电";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (loadstateBForth){
            case '0':
                washOrderCommand = "臭氧风机断电";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "臭氧风机通电";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (loadstateBFifth){
            case '0':
                washOrderCommand = "冲洗阀断电";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "冲洗阀通电";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (loadstateBSixth){
            case '0':
                washOrderCommand = "消毒剂投放阀断电";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "消毒剂投放阀通电";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        switch (loadstateBSeventh){
            case '0':
                washOrderCommand = "洗涤剂投放阀断电";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            case '1':
                washOrderCommand = "洗涤剂投放阀通电";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
            default:
                washOrderCommand = "N";
                result += countNum+":"+washOrderCommand+"@";
                countNum++;
                break;
        }
        //负载状态C未定义（67）
        // 预留（68）
        // 脱水平衡值
        String removeWaterBalance = arrayData[70] + arrayData[71];
        int removeWaterBalanceInteger = Integer.parseInt(removeWaterBalance,16);
        if(removeWaterBalanceInteger>=0&&removeWaterBalanceInteger<=1500){
            result += countNum + ":" + String.valueOf(removeWaterBalanceInteger) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //泡沫检测
        String bubbleCheck = arrayData[72] + arrayData[73];
        int bubbleCheckInteger = Integer.parseInt(bubbleCheck,16);
        result += countNum + ":" + String.valueOf(bubbleCheckInteger) + "@";
        countNum++;
        //净水流量值
        String waterNetFlow = arrayData[74] + arrayData[75];
        int waterNetFlowInteger = Integer.parseInt(waterNetFlow,16);
        result += countNum + ":" + String.valueOf((float)waterNetFlowInteger/100) + "@";
        countNum++;
        //电机电流
        String electricityFlow = arrayData[76] + arrayData[77];
        int electricityFlowInteger = Integer.parseInt(electricityFlow,16);
        if(electricityFlowInteger>=0&&electricityFlowInteger<=30000){
            result += countNum + ":" + String.valueOf((float)electricityFlowInteger/1000) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //电机电压
        String electricityPower = arrayData[78] + arrayData[79];
        int electricityPowerInteger = Integer.parseInt(electricityPower,16);
        if(electricityPowerInteger>=0&&electricityPowerInteger<=5000){
            result += countNum + ":" + String.valueOf((float)electricityPowerInteger/10) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //有功功率
        String activePower = arrayData[80] + arrayData[81];
        int activePowerInteger = Integer.parseInt(activePower,16);
        if(activePowerInteger>=0&&activePowerInteger<=5000){
            result += countNum + ":" + String.valueOf(activePowerInteger) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        //
        //无功功率
        String reactivePower = arrayData[82] + arrayData[83];
        int reactivePowerInteger = Integer.parseInt(reactivePower,16);
        if(reactivePowerInteger>=0&&reactivePowerInteger<=5000){
            result += countNum + ":" + String.valueOf(reactivePowerInteger) + "@";
            countNum++;
        }else{
            washOrderCommand = "N";
            result += countNum+":"+washOrderCommand+"@";
            countNum++;
        }
        return result;
    }
   /* public String getAlarm(String rawData){
        rawData = rawData.replaceAll(" +"," ");
        String arrayData[] = rawData.split(" ");
        String message=arrayData[17]+arrayData[18]+arrayData[19]+arrayData[20]+arrayData[21]+arrayData[22]+arrayData[23];
        System.out.println(message);
        String alarmSignificant = "";
        String binary = "";
        for(int i=0;i<message.length();i++){
            String s = Integer.toBinaryString(Integer.parseInt(String.valueOf(message.charAt(i))));
            //拼接串 拼成4位
            while (s.length()<4){
                s="0"+s;
            }
            binary += s;
        }
        System.out.println("输出二进制:"+binary);
        List<Integer> addr = new ArrayList<Integer>();
        if(binary.contains("1")){
            for(int j=0;j<binary.length();j++){
                if(String.valueOf(binary.charAt(j)).equals("1")){
                    addr.add(j);
                }
            }
        }else {
            addr.add(56);
        }
        *//***
         *
         * 重新定判定报警信息:
         * bianary为0 则解除报警,固定56为解除报警
         * 在binary中第length-3(53)位出现为:FE风机故障
         * 在binary中第length-4(52)出现为:F4水加热断开
         * 在binary中第length-5(51)出现为:霍尔故障 F7
         * 在binary中第length-6(50)出现为:速度错误 F7
         * 在binary中第length-7(49)出现为:电压过高 F7
         * 在binary中第length-8(48)出现为:电压过低 F7
         * 在binary中第length-10(46)出现为:DD电机NTC故障 F7
         * 在binary中第length-11(45)出现为:电机定子高温保护 F7
         * 在binary中第length-12(44)出现为:电流检测电路故障 F7
         * 在binary中第length-13(43)出现为:过流 F7
         * 在binary中第length-14(42)出现为:IPM故障 F7
         * 在binary中第length-15(41)出现为:缺相保护 F7
         * 在binary中第length-16(40)出现为:启动失败 F7
         * 在binary中第length-17(39)出现为:Ec无上电信号 Ec
         * 在binary中第length-18(38)出现为:烘干继电器故障 Fd
         * 在binary中第length-19(37)出现为:烘干加热丝故障 Fd
         * 在binary中第length-20(36)出现为:温度传感器故障 F3
         * 在binary中第length-21(35)出现为:进风口传感器故障 F9
         * 在binary中第length-22(34)出现为:冷凝传感器故障 F9
         * 在binary中第length-23(33)出现为:E2门锁锁门异常 E2
         * 在binary中第length-24(32)出现为:E2门锁解锁异常 E2
         * 在binary中第length-25(31)出现为:与电机驱动模块通讯异常 FC1
         * 在binary中第length-26(30)出现为:与电源驱动模块通讯异常 FC2
         * 在binary中第length-27(29)出现为:与显示按键通讯故障 Fc
         * 在binary中第length-28(28)出现为:Eb主继电器粘连 Eb
         * 在binary中第length-29(27)出现为:FA水位传感器异常 FA
         * 在binary中第length-30(26)出现为:E4进水异常 E4
         * 在binary中第length-31(25)出现为:排水故障 E1
         * 在binary中第length-32(24)出现为:异常高水位(洗涤、漂洗时) E8
         * 在binary中第length-33(23)出现为:烘干水位异常 E8/E12
         * 在binary中第length-34(22)出现为:干烧（加热时水位偏低） E4
         * 在binary中第length-35(21)出现为:洗涤时水位偏低 E4
         * 在binary中第length-36(20)出现为:水位异常（水位达到溢水水位） E8
         * 在binary中第length-37(19)出现为:脱水时分布不平衡 Unb
         * 在binary中第length-38(18)出现为:E_L称重数据错误 E_L
         * 在binary中第length-39(17)出现为:AL_E烘干超重 AL_E
         * 在binary中第length-40(16)出现为:主控板EEPROM读写错误 EE
         * 在binary中第length-41(15)出现为:桶内温度过高 H
         * 在binary中第length-42(14)出现为:其他故障 E0
         * 在binary中第length-44(12)出现为:烘干驱动模块通讯异常 FC3
         * 在binary中第length-45(11)出现为:漏水报警 Fb
         * 在binary中第length-46(10)出现为:净水模块性能衰减提醒 F6
         * 在binary中第length-47(9)出现为:净水洗驱动板通讯故障 FC4
         * 在binary中第length-48(8)出现为:与MU模块通讯异常 FC5
         * 在binary中第length-49(7)出现为:总线通讯报警 FC0
         * 在binary中第length-50(6)出现为:UI与WP通讯异常报警 FCU
         * 在binary中第length-51(5)出现为:离合电机异常 FL
         * **//*
        for(int k=0;k<addr.size();k++) {
            switch (addr.get(k)) {
                case 56:
                    alarmSignificant += "报警解除";
                    alarmSignificant += "@/";
                    break;
                case 53:
                    alarmSignificant += "风机故障";
                    alarmSignificant += "@FE,";
                    break;
                case 52:
                    alarmSignificant += "水加热断开";
                    alarmSignificant += "@F4,";
                    break;
                case 51:
                    alarmSignificant += "霍尔故障";
                    alarmSignificant += "@F7,";
                    break;
                case 50:
                    alarmSignificant += "速度错误";
                    alarmSignificant += "@F7,";
                    break;
                case 49:
                    alarmSignificant += "电压过高";
                    alarmSignificant += "@F7,";
                    break;
                case 48:
                    alarmSignificant += "电压过低";
                    alarmSignificant += "@F7,";
                    break;
                case 46:
                    alarmSignificant += "DD电机NTC故障";
                    alarmSignificant += "@F7,";
                    break;
                case 45:
                    alarmSignificant += "电机定子高温保护";
                    alarmSignificant += "@F7,";
                    break;
                case 44:
                    alarmSignificant += "电流检测电路故障";
                    alarmSignificant += "@F7,";
                    break;
                case 43:
                    alarmSignificant += "过流";
                    alarmSignificant += "@F7,";
                    break;
                case 42:
                    alarmSignificant += "IPM故障";
                    alarmSignificant += "@F7,";
                    break;
                case 41:
                    alarmSignificant += "缺相保护";
                    alarmSignificant += "@F7,";
                    break;
                case 40:
                    alarmSignificant += "启动失败";
                    alarmSignificant += "@F7,";
                    break;
                case 39:
                    alarmSignificant += "Ec无上电信号";
                    alarmSignificant += "@Ec,";
                    break;
                case 38:
                    alarmSignificant += "烘干继电器故障";
                    alarmSignificant += "@Fd,";
                    break;
                case 37:
                    alarmSignificant += "烘干加热丝故障";
                    alarmSignificant += "@Fd,";
                    break;
                case 36:
                    alarmSignificant += "温度传感器故障";
                    alarmSignificant += "@F3,";
                    break;
                case 35:
                    alarmSignificant += "进风口传感器故障";
                    alarmSignificant += "@F9,";
                    break;
                case 34:
                    alarmSignificant += "冷凝传感器故障";
                    alarmSignificant += "@F9,";
                    break;
                case 33:
                    alarmSignificant += "E2门锁锁门异常";
                    alarmSignificant += "@E2,";
                    break;
                case 32:
                    alarmSignificant += "E2门锁解锁异常";
                    alarmSignificant += "@E2,";
                    break;
                case 31:
                    alarmSignificant += "与电机驱动模块通讯异常";
                    alarmSignificant += "@FC1,";
                    break;
                case 30:
                    alarmSignificant += "与电源驱动模块通讯异常";
                    alarmSignificant += "@FC2,";
                    break;
                case 29:
                    alarmSignificant += "与显示按键通讯故障";
                    alarmSignificant += "@Fc,";
                    break;
                case 28:
                    alarmSignificant += "Eb主继电器粘连";
                    alarmSignificant += "@Eb,";
                    break;
                case 27:
                    alarmSignificant += "FA水位传感器异常";
                    alarmSignificant += "@FA,";
                    break;
                case 26:
                    alarmSignificant += "E4进水异常";
                    alarmSignificant += "@E4,";
                    break;
                case 25:
                    alarmSignificant += "排水故障";
                    alarmSignificant += "@E1,";
                    break;
                case 24:
                    alarmSignificant += "异常高水位(洗涤、漂洗时)";
                    alarmSignificant += "@E8,";
                    break;
                case 23:
                    alarmSignificant += "烘干水位异常";
                    alarmSignificant += "@E8/E12,";
                    break;
                case 22:
                    alarmSignificant += "干烧（加热时水位偏低";
                    alarmSignificant += "@E4,";
                    break;
                case 21:
                    alarmSignificant += "洗涤时水位偏低";
                    alarmSignificant += "@E4,";
                    break;
                case 20:
                    alarmSignificant += "水位异常（水位达到溢水水位";
                    alarmSignificant += "@E8,";
                    break;
                case 19:
                    alarmSignificant += "脱水时分布不平衡";
                    alarmSignificant += "@Unb,";
                    break;
                case 18:
                    alarmSignificant += "E_L称重数据错误";
                    alarmSignificant += "@E_L,";
                    break;
                case 17:
                    alarmSignificant += "AL_E烘干超重";
                    alarmSignificant += "@AL_E,";
                    break;
                case 16:
                    alarmSignificant += "主控板EEPROM读写错误";
                    alarmSignificant += "@EE,";
                    break;
                case 15:
                    alarmSignificant += "桶内温度过高";
                    alarmSignificant += "@H,";
                    break;
                case 14:
                    alarmSignificant += "其他故障";
                    alarmSignificant += "@E0,";
                    break;
                case 12:
                    alarmSignificant += "烘干驱动模块通讯异常";
                    alarmSignificant += "@FC3,";
                    break;
                case 11:
                    alarmSignificant += "漏水报警";
                    alarmSignificant += "@Fb,";
                    break;
                case 10:
                    alarmSignificant += "净水模块性能衰减提醒";
                    alarmSignificant += "@F6,";
                    break;
                case 9:
                    alarmSignificant += "净水洗驱动板通讯故障";
                    alarmSignificant += "@FC4,";
                    break;
                case 8:
                    alarmSignificant += "与MU模块通讯异常";
                    alarmSignificant += "@FC5,";
                    break;
                case 7:
                    alarmSignificant += "总线通讯报警";
                    alarmSignificant += "@FC0,";
                    break;
                case 6:
                    alarmSignificant += "UI与WP通讯异常报警";
                    alarmSignificant += "@FCU,";
                    break;
                case 5:
                    alarmSignificant += "离合电机异常";
                    alarmSignificant += "@FL,";
                    break;
            }
        }

            return alarmSignificant;
    }*/
    public String getAlarm(String rawData){
        rawData = rawData.replaceAll(" +"," ");
        String arrayData[] = rawData.split(" ");
        String message=arrayData[16]+arrayData[17]+arrayData[18]+arrayData[19]+arrayData[20]+arrayData[21]+arrayData[22]+arrayData[23];
        System.out.println(message);
        String alarmSignificant = "";
        String binary = "";
        for(int i=0;i<message.length();i++){
            String s = Integer.toBinaryString(Integer.parseInt(String.valueOf(message.charAt(i)),16));
            //拼接串 拼成4位
            while (s.length()<4){
                s="0"+s;
            }
            binary += s;
        }
        //System.out.println("输出二进制:"+binary);
        List<Integer> addr = new ArrayList<Integer>();
        if(binary.contains("1")){
            for(int j=0;j<binary.length();j++){
                if(String.valueOf(binary.charAt(j)).equals("1")){
                    addr.add(j);
                }
            }
        }else {
            addr.add(64);
        }
        /***
         *
         * 重新定判定报警信息:
         * bianary为0 则解除报警,固定j=64为解除报警
         * 在binary中第length-3(61)位出现为:FE风机故障
         * 在binary中第length-4(60)出现为:F4水加热断开
         * 在binary中第length-5(59)出现为:霍尔故障 F7
         * 在binary中第length-6(58)出现为:速度错误 F7
         * 在binary中第length-7(57)出现为:电压过高 F7
         * 在binary中第length-8(56)出现为:电压过低 F7
         * 在binary中第length-10(54)出现为:DD电机NTC故障 F7
         * 在binary中第length-11(53)出现为:电机定子高温保护 F7
         * 在binary中第length-12(52)出现为:电流检测电路故障 F7
         * 在binary中第length-13(51)出现为:过流 F7
         * 在binary中第length-14(50)出现为:IPM故障 F7
         * 在binary中第length-15(49)出现为:缺相保护 F7
         * 在binary中第length-16(48)出现为:启动失败 F7
         * 在binary中第length-17(47)出现为:Ec无上电信号 Ec
         * 在binary中第length-18(46)出现为:烘干继电器故障 Fd
         * 在binary中第length-19(45)出现为:烘干加热丝故障 Fd
         * 在binary中第length-20(44)出现为:温度传感器故障 F3
         * 在binary中第length-21(43)出现为:进风口传感器故障 F9
         * 在binary中第length-22(42)出现为:冷凝传感器故障 F9
         * 在binary中第length-23(41)出现为:E2门锁锁门异常 E2
         * 在binary中第length-24(40)出现为:E2门锁解锁异常 E2
         * 在binary中第length-25(39)出现为:与电机驱动模块通讯异常 FC1
         * 在binary中第length-26(38)出现为:与电源驱动模块通讯异常 FC2
         * 在binary中第length-27(37)出现为:与显示按键通讯故障 Fc
         * 在binary中第length-28(36)出现为:Eb主继电器粘连 Eb
         * 在binary中第length-29(35)出现为:FA水位传感器异常 FA
         * 在binary中第length-30(34)出现为:E4进水异常 E4
         * 在binary中第length-31(33)出现为:排水故障 E1
         * 在binary中第length-32(32)出现为:异常高水位(洗涤、漂洗时) E8
         * 在binary中第length-33(31)出现为:烘干水位异常 E8/E12
         * 在binary中第length-34(30)出现为:干烧（加热时水位偏低） E4
         * 在binary中第length-35(29)出现为:洗涤时水位偏低 E4
         * 在binary中第length-36(28)出现为:水位异常（水位达到溢水水位） E8
         * 在binary中第length-37(27)出现为:脱水时分布不平衡 Unb
         * 在binary中第length-38(26)出现为:E_L称重数据错误 E_L
         * 在binary中第length-39(25)出现为:AL_E烘干超重 AL_E
         * 在binary中第length-40(24)出现为:主控板EEPROM读写错误 EE
         * 在binary中第length-41(23)出现为:桶内温度过高 H
         * 在binary中第length-42(22)出现为:其他故障 E0
         * 在binary中第length-44(20)出现为:烘干驱动模块通讯异常 FC3
         * 在binary中第length-45(19)出现为:漏水报警 Fb
         * 在binary中第length-46(18)出现为:净水模块性能衰减提醒 F6
         * 在binary中第length-47(17)出现为:净水洗驱动板通讯故障 FC4
         * 在binary中第length-48(16)出现为:与MU模块通讯异常 FC5
         * 在binary中第length-49(15)出现为:总线通讯报警 FC0
         * 在binary中第length-50(14)出现为:UI与WP通讯异常报警 FCU
         * 在binary中第length-51(13)出现为:离合电机异常 FL
         * 在binary中第length-52(12)出现为:软件自检错误FV
         * 在binary中第length-53(11)出现为:自动投放流量计故障FO
         * 在binary中第length-54(10)出现为:FU风机驱动板通信故障FC6
         * 在binary中第length-55(9)出现为:RFID模块通信故障FC7
         * 在binary中第length-61(3)出现为:接近传感器异常FN
         * 在binary中第length-62(2)出现为:无线模块配置失败FH
         * **/
        for(int k=0;k<addr.size();k++) {
            switch (addr.get(k)) {
                case 64:
                    alarmSignificant += "报警解除";
                    alarmSignificant += "@/";
                    break;
                case 61:
                    alarmSignificant += "风机故障";
                    alarmSignificant += "@FE,";
                    break;
                case 60:
                    alarmSignificant += "水加热断开";
                    alarmSignificant += "@F4,";
                    break;
                case 59:
                    alarmSignificant += "霍尔故障";
                    alarmSignificant += "@F7,";
                    break;
                case 58:
                    alarmSignificant += "速度错误";
                    alarmSignificant += "@F7,";
                    break;
                case 57:
                    alarmSignificant += "电压过高";
                    alarmSignificant += "@F7,";
                    break;
                case 56:
                    alarmSignificant += "电压过低";
                    alarmSignificant += "@F7,";
                    break;
                case 54:
                    alarmSignificant += "DD电机NTC故障";
                    alarmSignificant += "@F7,";
                    break;
                case 53:
                    alarmSignificant += "电机定子高温保护";
                    alarmSignificant += "@F7,";
                    break;
                case 52:
                    alarmSignificant += "电流检测电路故障";
                    alarmSignificant += "@F7,";
                    break;
                case 51:
                    alarmSignificant += "过流";
                    alarmSignificant += "@F7,";
                    break;
                case 50:
                    alarmSignificant += "IPM故障";
                    alarmSignificant += "@F7,";
                    break;
                case 49:
                    alarmSignificant += "缺相保护";
                    alarmSignificant += "@F7,";
                    break;
                case 48:
                    alarmSignificant += "启动失败";
                    alarmSignificant += "@F7,";
                    break;
                case 47:
                    alarmSignificant += "Ec无上电信号";
                    alarmSignificant += "@Ec,";
                    break;
                case 46:
                    alarmSignificant += "烘干继电器故障";
                    alarmSignificant += "@Fd,";
                    break;
                case 45:
                    alarmSignificant += "烘干加热丝故障";
                    alarmSignificant += "@Fd,";
                    break;
                case 44:
                    alarmSignificant += "温度传感器故障";
                    alarmSignificant += "@F3,";
                    break;
                case 43:
                    alarmSignificant += "烘干温度传感器故障";
                    alarmSignificant += "@F9,";
                    break;
                case 42:
                    alarmSignificant += "烘干冷凝温度传感器故障";
                    alarmSignificant += "@F9,";
                    break;
                case 41:
                    alarmSignificant += "E2门锁锁门异常";
                    alarmSignificant += "@E2,";
                    break;
                case 40:
                    alarmSignificant += "E2门锁解锁异常";
                    alarmSignificant += "@E2,";
                    break;
                case 39:
                    alarmSignificant += "与电机驱动模块通讯异常";
                    alarmSignificant += "@FC1,";
                    break;
                case 38:
                    alarmSignificant += "与电源驱动模块通讯异常";
                    alarmSignificant += "@FC2,";
                    break;
                case 37:
                    alarmSignificant += "与显示按键通讯故障";
                    alarmSignificant += "@Fc,";
                    break;
                case 36:
                    alarmSignificant += "Eb主继电器粘连";
                    alarmSignificant += "@Eb,";
                    break;
                case 35:
                    alarmSignificant += "FA水位传感器异常";
                    alarmSignificant += "@FA,";
                    break;
                case 34:
                    alarmSignificant += "E4进水异常";
                    alarmSignificant += "@E4,";
                    break;
                case 33:
                    alarmSignificant += "排水故障";
                    alarmSignificant += "@E1,";
                    break;
                case 32:
                    alarmSignificant += "异常高水位(洗涤、漂洗时)";
                    alarmSignificant += "@E8,";
                    break;
                case 31:
                    alarmSignificant += "烘干水位异常";
                    alarmSignificant += "@E8/E12,";
                    break;
                case 30:
                    alarmSignificant += "干烧（加热时水位偏低";
                    alarmSignificant += "@E4,";
                    break;
                case 29:
                    alarmSignificant += "洗涤时水位偏低";
                    alarmSignificant += "@E4,";
                    break;
                case 28:
                    alarmSignificant += "水位异常（水位达到溢水水位";
                    alarmSignificant += "@E8,";
                    break;
                case 27:
                    alarmSignificant += "脱水时分布不平衡";
                    alarmSignificant += "@Unb,";
                    break;
                case 26:
                    alarmSignificant += "E_L称重数据错误";
                    alarmSignificant += "@E_L,";
                    break;
                case 25:
                    alarmSignificant += "AL_E烘干超重";
                    alarmSignificant += "@AL_E,";
                    break;
                case 24:
                    alarmSignificant += "主控板EEPROM读写错误";
                    alarmSignificant += "@EE,";
                    break;
                case 23:
                    alarmSignificant += "桶内温度过高";
                    alarmSignificant += "@H,";
                    break;
                case 22:
                    alarmSignificant += "其他故障";
                    alarmSignificant += "@E0,";
                    break;
                case 20:
                    alarmSignificant += "烘干驱动模块通讯异常";
                    alarmSignificant += "@FC3,";
                    break;
                case 19:
                    alarmSignificant += "漏水报警";
                    alarmSignificant += "@Fb,";
                    break;
                case 18:
                    alarmSignificant += "净水模块性能衰减提醒";
                    alarmSignificant += "@F6,";
                    break;
                case 17:
                    alarmSignificant += "净水洗驱动板通讯故障";
                    alarmSignificant += "@FC4,";
                    break;
                case 16:
                    alarmSignificant += "与MU模块通讯异常";
                    alarmSignificant += "@FC5,";
                    break;
                case 15:
                    alarmSignificant += "总线通讯报警";
                    alarmSignificant += "@FC0,";
                    break;
                case 14:
                    alarmSignificant += "UI与WP通讯异常报警";
                    alarmSignificant += "@FCU,";
                    break;
                case 13:
                    alarmSignificant += "离合电机异常";
                    alarmSignificant += "@FL,";
                    break;
                case 12:
                    alarmSignificant += "软件自检错误";
                    alarmSignificant += "@FV,";
                    break;
                case 11:
                    alarmSignificant += "自动投放流量计故障";
                    alarmSignificant += "@FO,";
                    break;
                case 10:
                    alarmSignificant += "FU风机驱动板通信故障";
                    alarmSignificant += "@FC6,";
                    break;
                case 9:
                    alarmSignificant += "RFID模块通信故障";
                    alarmSignificant += "@FC7,";
                    break;
                case 3:
                    alarmSignificant += "接近传感器异常";
                    alarmSignificant += "@FN,";
                    break;
                case 2:
                    alarmSignificant += "无线模块配置失败";
                    alarmSignificant += "@FH,";
                    break;
            }
        }

        return alarmSignificant;
    }

    public static void main(String[] args) {
        String testString6D = "FF FF 38 00 00 00 00 00 00 06 6D 01 1C 00 00 00 00 08 01 00 07 00 00 06 00 06 00 00 00 00 00 87 00 00 00 00 01 B0 00 00 0A 04 00 00 00 00 00 00 00 64 00 00 00 00 00 00 00 00 8E";
        String testString7D = "52 00 00 00 00 00 00 06 7D 01 1C 00 00 00 0E 49 01 00 01 00 00 09 00 09 00 01 00 00 00 8D 00 02 00 00 01 B7 00 00 0A 04 00 00 00 00 00 00 09 64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 00 00 00 00 10 00 00 00 00 00 00 00 00 00 00 00 00 B0";
        String alarm1 =       "FF FF 16 00 00 00 00 00 00 04 0F 5A 00 00 00 00 00 00 00 00 00 18 00 00 84";
        String testAlarm =    "16 00 00 00 00 00 00 04 0F 5A 00 00 00 00 00 00 00 00 00 00 00 04 84";
         //                                                 "0F 5A 00 00 00 00 00 08 00 00 00 00 00 00"//
        //                                                         00 00 00 00 00 00 00 00 00 08 00 00
        //
        String Type = testString7D.substring(24, 29);
        String Type1 = testString7D.substring(42, 44);
        System.out.println(Type);
        System.out.println(Type1);
        /*Roller2 r = new Roller2();
        String s11[] = testAlarm.split(" ");
        System.out.println("s11:"+s11.length);
        System.out.println(r.getAlarm(alarm1));*/
    }
}
